//
//  HomeTransforShowOrderInfoSecondOneTableViewCell.m
//  ZJControlsClass
//
//  Created by mac on 2024/12/8.
//

#import "HomeTransforShowOrderInfoSecondOneTableViewCell.h"

@interface HomeTransforShowOrderInfoSecondOneTableViewCell ()

@property (nonatomic,strong) UILabel * leftNameLabel;
@property (nonatomic,strong) UILabel * rightNameLabel;
@property (nonatomic,strong) UIView * lineNameView;

@property (nonatomic,strong) UILabel * leftJieLabel;
@property (nonatomic,strong) UILabel * rightJieLabel;
@property (nonatomic,strong) UIView * lineJieView;

@property (nonatomic,strong) UILabel * leftcompalyLabel;
@property (nonatomic,strong) UILabel * rightcompalyLabel;
@property (nonatomic,strong) UIView * linecompalyView;

@property (nonatomic,strong) UILabel * leftGoodsLabel;
@property (nonatomic,strong) UILabel * rightGoodsLabel;
@property (nonatomic,strong) UIView * lineGoodsView;

@property (nonatomic,strong) UILabel * leftHaveTimeLabel;
@property (nonatomic,strong) UILabel * rightHaveTimeLabel;
@property (nonatomic,strong) UIView * lineHaveTimeView;

@property (nonatomic,strong) UILabel * leftSQTimeLabel;
@property (nonatomic,strong) UILabel * rightSQTimeLabel;
@property (nonatomic,strong) UIView * lineSQTimeView;

@property (nonatomic,strong) UILabel * leftDealTimeLabel;
@property (nonatomic,strong) UILabel * rightDealTimeLabel;
@property (nonatomic,strong) UIView * lineDealTimeView;



@end



@implementation HomeTransforShowOrderInfoSecondOneTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self){
        
        [self coinfigUI];
        
    }
    return self;
}


-(void)coinfigUI{
    
    [self.contentView addSubview:self.leftNameLabel];
    [self.contentView addSubview:self.rightNameLabel];
    [self.contentView addSubview:self.lineNameView];
    
    [self.contentView addSubview:self.leftJieLabel];
    [self.contentView addSubview:self.rightJieLabel];
    [self.contentView addSubview:self.lineJieView];
    
    [self.contentView addSubview:self.leftcompalyLabel];
    [self.contentView addSubview:self.rightcompalyLabel];
    [self.contentView addSubview:self.linecompalyView];
    
    [self.contentView addSubview:self.leftGoodsLabel];
    [self.contentView addSubview:self.rightGoodsLabel];
    [self.contentView addSubview:self.lineGoodsView];
    
    [self.contentView addSubview:self.leftHaveTimeLabel];
    [self.contentView addSubview:self.rightHaveTimeLabel];
    [self.contentView addSubview:self.lineHaveTimeView];
    
    [self.contentView addSubview:self.leftSQTimeLabel];
    [self.contentView addSubview:self.rightSQTimeLabel];
    [self.contentView addSubview:self.lineSQTimeView];
    
    [self.contentView addSubview:self.leftDealTimeLabel];
    [self.contentView addSubview:self.rightDealTimeLabel];
    [self.contentView addSubview:self.lineDealTimeView];
    
    [self.leftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.contentView);
    }];
    
    [self.rightNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftNameLabel.mas_centerY);
    }];
    
    [self.lineNameView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftNameLabel.mas_left);
        make.right.equalTo(self.rightNameLabel.mas_right);
        make.top.equalTo(self.leftNameLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    [self.leftJieLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftNameLabel.mas_bottom);
    }];
    
    [self.rightJieLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftJieLabel.mas_centerY);
    }];
    
    [self.lineJieView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftJieLabel.mas_left);
        make.right.equalTo(self.rightJieLabel.mas_right);
        make.top.equalTo(self.leftJieLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    [self.leftcompalyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftJieLabel.mas_bottom);
    }];
    
    [self.rightcompalyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftcompalyLabel.mas_centerY);
    }];
    
    [self.linecompalyView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftcompalyLabel.mas_left);
        make.right.equalTo(self.rightcompalyLabel.mas_right);
        make.top.equalTo(self.leftcompalyLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    [self.leftGoodsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftcompalyLabel.mas_bottom);
    }];

    [self.rightGoodsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftGoodsLabel.mas_centerY);
    }];

    [self.lineGoodsView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftGoodsLabel.mas_left);
        make.right.equalTo(self.rightGoodsLabel.mas_right);
        make.top.equalTo(self.leftGoodsLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    [self.leftHaveTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftGoodsLabel.mas_bottom);
    }];
    
    [self.rightHaveTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftHaveTimeLabel.mas_centerY);
    }];
    
    [self.lineHaveTimeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftHaveTimeLabel.mas_left);
        make.right.equalTo(self.rightHaveTimeLabel.mas_right);
        make.top.equalTo(self.leftHaveTimeLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];

    [self.leftSQTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftHaveTimeLabel.mas_bottom);
    }];

    [self.rightSQTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftSQTimeLabel.mas_centerY);
    }];

    [self.lineSQTimeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftSQTimeLabel.mas_left);
        make.right.equalTo(self.rightSQTimeLabel.mas_right);
        make.top.equalTo(self.leftSQTimeLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    [self.leftDealTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(ALIGN_WIDTH_PT(12));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
        make.top.equalTo(self.leftSQTimeLabel.mas_bottom);
    }];
    
    [self.rightDealTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-ALIGN_WIDTH_PT(12));
        make.centerY.equalTo(self.leftDealTimeLabel.mas_centerY);
    }];
    
    [self.lineDealTimeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftDealTimeLabel.mas_left);
        make.right.equalTo(self.rightDealTimeLabel.mas_right);
        make.top.equalTo(self.leftDealTimeLabel.mas_bottom);
        make.height.mas_equalTo(1);
    }];
    
    
    
}

-(void)setModel:(HomeTransferShowOrderInfoModel *)model{
    _model = model;
    self.rightNameLabel.text = model.fromUserName;
    self.rightJieLabel.text = model.toUserName;
    self.rightcompalyLabel.text = model.toUserCompanyName;
    self.rightGoodsLabel.text = model.goodsType;
    self.rightHaveTimeLabel.text = [NSString stringWithFormat:@"%@-%@",model.startTime ?: @"",model.endTime ?: @""];
    self.rightSQTimeLabel.text = model.transferTime ?: @"";
    self.rightDealTimeLabel.text = model.finishTime ?: @"";
}

#pragma mark -- 懒加载
-(UILabel *)leftNameLabel{
    if (!_leftNameLabel){
        _leftNameLabel = [UILabel new];
        _leftNameLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftNameLabel.font = FONT14;
        _leftNameLabel.text = @"申请人";
        _leftNameLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftNameLabel;
}

-(UILabel *)rightNameLabel{
    if (!_rightNameLabel){
        _rightNameLabel = [UILabel new];
        _rightNameLabel.textColor = [UIColor blackColor];
        _rightNameLabel.font = FONT14;
        _rightNameLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightNameLabel;
}

-(UIView *)lineNameView{
    if (!_lineNameView){
        _lineNameView = [UIView new];
        _lineNameView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineNameView;
}

-(UILabel *)leftJieLabel{
    if (!_leftJieLabel){
        _leftJieLabel = [UILabel new];
        _leftJieLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftJieLabel.font = FONT14;
        _leftJieLabel.text = @"接单人";
        _leftJieLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftJieLabel;
}

-(UILabel *)rightJieLabel{
    if (!_rightJieLabel){
        _rightJieLabel = [UILabel new];
        _rightJieLabel.textColor = [UIColor blackColor];
        _rightJieLabel.font = FONT14;
        _rightJieLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightJieLabel;
}

-(UIView *)lineJieView{
    if (!_lineJieView){
        _lineJieView = [UIView new];
        _lineJieView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineJieView;
}

-(UILabel *)leftcompalyLabel{
    if (!_leftcompalyLabel){
        _leftcompalyLabel = [UILabel new];
        _leftcompalyLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftcompalyLabel.font = FONT14;
        _leftcompalyLabel.text = @"所属公司";
        _leftcompalyLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftcompalyLabel;
}

-(UILabel *)rightcompalyLabel{
    if (!_rightcompalyLabel){
        _rightcompalyLabel = [UILabel new];
        _rightcompalyLabel.textColor = [UIColor blackColor];
        _rightcompalyLabel.font = FONT14;
        _rightcompalyLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightcompalyLabel;
}

-(UIView *)linecompalyView{
    if (!_linecompalyView){
        _linecompalyView = [UIView new];
        _linecompalyView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _linecompalyView;
}

-(UILabel *)leftGoodsLabel{
    if (!_leftGoodsLabel){
        _leftGoodsLabel = [UILabel new];
        _leftGoodsLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftGoodsLabel.font = FONT14;
        _leftGoodsLabel.text = @"携带物品";
        _leftGoodsLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftGoodsLabel;
}

-(UILabel *)rightGoodsLabel{
    if (!_rightGoodsLabel){
        _rightGoodsLabel = [UILabel new];
        _rightGoodsLabel.textColor = [UIColor blackColor];
        _rightGoodsLabel.font = FONT14;
        _rightGoodsLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightGoodsLabel;
}

-(UIView *)lineGoodsView{
    if (!_lineGoodsView){
        _lineGoodsView = [UIView new];
        _lineGoodsView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineGoodsView;
}

-(UILabel *)leftHaveTimeLabel{
    if (!_leftHaveTimeLabel){
        _leftHaveTimeLabel = [UILabel new];
        _leftHaveTimeLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftHaveTimeLabel.font = FONT14;
        _leftHaveTimeLabel.text = @"有效时间";
        _leftHaveTimeLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftHaveTimeLabel;
}

-(UILabel *)rightHaveTimeLabel{
    if (!_rightHaveTimeLabel){
        _rightHaveTimeLabel = [UILabel new];
        _rightHaveTimeLabel.textColor = [UIColor blackColor];
        _rightHaveTimeLabel.font = FONT14;
        _rightHaveTimeLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightHaveTimeLabel;
}

-(UIView *)lineHaveTimeView{
    if (!_lineHaveTimeView){
        _lineHaveTimeView = [UIView new];
        _lineHaveTimeView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineHaveTimeView;
}

-(UILabel *)leftSQTimeLabel{
    if (!_leftSQTimeLabel){
        _leftSQTimeLabel = [UILabel new];
        _leftSQTimeLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftSQTimeLabel.font = FONT14;
        _leftSQTimeLabel.text = @"申请时间";
        _leftSQTimeLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftSQTimeLabel;
}

-(UILabel *)rightSQTimeLabel{
    if (!_rightSQTimeLabel){
        _rightSQTimeLabel = [UILabel new];
        _rightSQTimeLabel.textColor = [UIColor blackColor];
        _rightSQTimeLabel.font = FONT14;
        _rightSQTimeLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightSQTimeLabel;
}

-(UIView *)lineSQTimeView{
    if (!_lineSQTimeView){
        _lineSQTimeView = [UIView new];
        _lineSQTimeView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineSQTimeView;
}

-(UILabel *)leftDealTimeLabel{
    if (!_leftDealTimeLabel){
        _leftDealTimeLabel = [UILabel new];
        _leftDealTimeLabel.textColor = COLOR_RGB(153, 153, 153);
        _leftDealTimeLabel.font = FONT14;
        _leftDealTimeLabel.text = @"处理时间";
        _leftDealTimeLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _leftDealTimeLabel;
}

-(UILabel *)rightDealTimeLabel{
    if (!_rightDealTimeLabel){
        _rightDealTimeLabel = [UILabel new];
        _rightDealTimeLabel.textColor = [UIColor blackColor];
        _rightDealTimeLabel.font = FONT14;
        _rightDealTimeLabel.textAlignment = NSTextAlignmentRight;
    }
    return _rightDealTimeLabel;
}

-(UIView *)lineDealTimeView{
    if (!_lineDealTimeView){
        _lineDealTimeView = [UIView new];
        _lineDealTimeView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _lineDealTimeView;
}


@end
